package gl.drawer

import gl.util.GLUtils

@ExperimentalUnsignedTypes
class Image: Drawer() {

    override fun initialize() {
        // program texture
        // textures
        // vertices
    }

    override fun update(): Boolean {
        super.update()
        GLUtils.capture()
        return false
    }

    override fun terminal() {
        // texture
    }
}

private val vSrc = """
#version 400 core

layout(location=0) in vec2 vPosition;
layout(location=1) in vec2 vTexCoord;

out vec2 texCoord;

void main() {
    gl_Position = vec4(vPosition, 0.0, 1.0);
    texCoord = vTexCoord;
}
""".trimIndent()

private val fSrc = """
#version 400 core

uniform sampler2D tex;

in vec2 texCoord;

out vec4 fColor;

void main() {
    fColor = texture(tex, texCoord);
    // fColor = vec4(texCoord, 0, 1);
}
""".trimIndent()